using System;
using System.Text;
using System.Collections.Generic;


namespace Managistics.Model {
    
    public class DetailOrderNn {
        private string _orderidNn;
        private string _itemId;
        private OrderNhanhNhanh _orderNhanhNhanh;
        private Items _items;
        private float _quantityNn;
        private float? _discountNn;
        private float _unitPriceNn;
        private bool? _statusItemFd;
        private short _vat;
        private double _id;
        public virtual string OrderidNn {
            get {
                return this._orderidNn;
            }
            set {
                this._orderidNn = value;
            }
        }
        public virtual string ItemId {
            get {
                return this._itemId;
            }
            set {
                this._itemId = value;
            }
        }
        public virtual OrderNhanhNhanh OrderNhanhNhanh {
            get {
                return this._orderNhanhNhanh;
            }
            set {
                this._orderNhanhNhanh = value;
            }
        }
        public virtual Items Items {
            get {
                return this._items;
            }
            set {
                this._items = value;
            }
        }
        public virtual float QuantityNn {
            get {
                return this._quantityNn;
            }
            set {
                this._quantityNn = value;
            }
        }
        public virtual float? DiscountNn {
            get {
                return this._discountNn;
            }
            set {
                this._discountNn = value;
            }
        }
        public virtual float UnitPriceNn {
            get {
                return this._unitPriceNn;
            }
            set {
                this._unitPriceNn = value;
            }
        }
        public virtual bool? StatusItemFd {
            get {
                return this._statusItemFd;
            }
            set {
                this._statusItemFd = value;
            }
        }
        public virtual short Vat {
            get {
                return this._vat;
            }
            set {
                this._vat = value;
            }
        }
        public virtual double Id {
            get {
                return this._id;
            }
            set {
                this._id = value;
            }
        }
        #region NHibernate Composite Key Requirements
        public override bool Equals(object obj) {
			if (obj == null) return false;
			var t = obj as DetailOrderNn;
			if (t == null) return false;
			if (OrderidNn == t.OrderidNn
			 && ItemId == t.ItemId)
				return true;

			return false;
        }
        public override int GetHashCode() {
			int hash = GetType().GetHashCode();
			hash = (hash * 397) ^ OrderidNn.GetHashCode();
			hash = (hash * 397) ^ ItemId.GetHashCode();

			return hash;
        }
        #endregion
    }
}
